feat: implement automatic Hyprland power-saving adjustments#1226
feat: implement automatic Hyprland power-saving adjustments#1226CYKLER01 wants to merge 7 commits into
Conversation
…ications based on power profile changes. including screen refresh rate.
|
Were you reading the discord? Just talked about this last night, funny timing haha Instead of hooking onto the set profile, it might be better to read the battery level, with configurable levels, to allow setting the powerprofiles automatically. But I do not think this should be something that changes with the power profile setting itself, rather battery or charging status dependent, that way it's a user configurable thing on top of controlling either manually when you don't want to change both on click. |
nope, not even on the discord currently, i was in class when i wrote this becuase my battery kept draining too fast
I was also considering adding an option to the settings that allows the different battery optimizations to be toggled on or off as i know that not everyone wants this. Also different options for refresh rate settings in high power and battery saver. |
If you're fine with me jumping into the PR, I could try something and PR your forked branch with it? |
yep, that works fine for me. Im new to all of this so id appreciate some help in areas and I definitely need to optimize my battery as well as i only get about three hours. |
Oh you didn't need to invite me to collaborate, I can PR your branch you used for this PR, better that way for separation, reviewing and merging. It'd simply update this PR too. |
- Added three way toggle component - Battery threshold-based power behaviour - Charging/unplugged behavior - Per-power profile settings - Added power management UI pane - Refresh rate control
- Changed battery pane to two-column layout (60/40) - Threshold cards - Collapsible edit mode - Fixed signal handlers - Changed toggle colors - m3error for disable state - Fixed duplicate charging toast - Changed threshold grid to single-column list
Battery power management
PR: Automated System Adjustments for Power Management
Overview
This PR implements a power management system that adjusts Hyprland decorations and monitor refresh rates based on the system's power profile and battery state. It integrates
PowerProfileswith existing UI components to automate energy conservation on portable devices.Key Changes
1. Logic & Triggers
The system now listens to multiple state changes to determine when to apply power-saving options:
Power Saverprofile.2. Visual & Display Adjustments
On,Off, orUnchanged. The "Unchanged" state ensures the logic does not override a user's current manual configuration during a profile switch.3. UI and User Feedback
lowPowerModeChangedtoUtilitiesConfig.qmlto allow users to enable or disable these notifications.Technical Implementation Details
Connectionsblock targeting thePowerProfilesservice to monitoractive_profileandchargechanges.Hypr.extras.applyOptionsfor decoration-specific changes.Hypr.extras.messagefor executing monitor-specific commands and dispatching config reloads.lowPowerModeChangedproperty to handle persistent user preferences for the new notification system.Credits
Huge thanks to @PixelKhaos since he almost entirely did the execution of this and for providing the demonstration video.
556607672-41140283-dd62-42e5-b25d-a6177c98967b.mp4